build: Bootstrap agent-ready infrastructure#139
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 AgentReady Assessment ReportRepository: NeMo-Guardrails 📊 Summary
Languages Detected
Repository Stats
🎯 Priority ImprovementsFocus on these high-impact fixes first:
📋 Detailed FindingsFindings sorted by priority (Tier 1 failures first, then Tier 2, etc.)
📝 Remediation StepsMeasured: missing (Threshold: present) Evidence:
Create CLAUDE.md or AGENTS.md with project-specific configuration for AI coding assistants
Commands: # Option 1: Standalone CLAUDE.md
touch CLAUDE.md
# Add content describing your project
# Option 2: Symlink CLAUDE.md to AGENTS.md
touch AGENTS.md
# Add content to AGENTS.md
ln -s AGENTS.md CLAUDE.md
# Option 3: @ reference in CLAUDE.md
echo '@AGENTS.md' > CLAUDE.md
touch AGENTS.md
# Add content to AGENTS.mdExamples: Coding Standards
CLAUDE.md with @ reference (Option 3)@AGENTS.md AGENTS.md (shared by multiple tools)Project OverviewThis project implements a REST API for user management. Architecture
Development Workflow# Setup
python -m venv .venv
source .venv/bin/activate
pip install -e .
# Run tests
pytest
# Start server
uvicorn app.main:app --reloadCode Conventions
Examples:
📝 Remediation StepsMeasured: 1/2 directories (Threshold: 2/2 directories) Evidence:
Organize code into standard directories (src/, tests/, docs/)
Commands: mkdir -p src tests docs
# Move source files to src/
# Move test files to tests/
📝 Remediation StepsMeasured: not configured (Threshold: configured) Evidence:
Configure conventional commits with commitlint
Commands: npm install --save-dev @commitlint/cli @commitlint/config-conventional husky📝 Remediation StepsMeasured: 16 huge, 29 large out of 580 (Threshold: <5% files >500 lines, 0 files >1000 lines) Evidence:
Refactor large files into smaller, focused modules
Examples: 📝 Remediation StepsMeasured: 53.8% (Threshold: ≥80%) Evidence:
Add docstrings to public functions and classes
Commands: # Install pydocstyle
pip install pydocstyle
# Check docstring coverage
pydocstyle src/
# Generate documentation
pip install sphinx
sphinx-apidoc -o docs/ src/Examples:
📝 Remediation StepsMeasured: organization:100, cohesion:92, naming:0 (Threshold: ≥75 overall) Evidence:
Refactor code to improve separation of concerns
Examples:
📝 Remediation StepsMeasured: 337 lines, 25 headings, 8 bullets (Threshold: <500 lines, structured format) Evidence:
Make documentation more concise and structured
Commands: # Check README length
wc -l README.md
# Count headings
grep -c '^#' README.mdExamples: Features
DocumentationSee docs/ for detailed guides. Bad: Verbose proseThis project is a tool that helps you assess your repository [Many more paragraphs of prose...] Examples: Examples:
📝 Remediation StepsMeasured: no OpenAPI spec (Threshold: OpenAPI 3.x spec present) Evidence:
Create OpenAPI specification for API endpoints
Commands: # Install OpenAPI validator
npm install -g @stoplight/spectral-cli
# Validate spec
spectral lint openapi.yaml
# Generate client SDK
npx @openapitools/openapi-generator-cli generate \
-i openapi.yaml \
-g python \
-o client/Examples:
📝 Remediation StepsMeasured: basic config (Threshold: CI with best practices) Evidence:
Add or improve CI/CD pipeline configuration
Commands: # Create GitHub Actions workflow
mkdir -p .github/workflows
touch .github/workflows/ci.yml
# Validate workflow
gh workflow view ci.ymlExamples:
📝 Remediation StepsMeasured: pylint, ruff (Threshold: ≥60% of applicable linters configured) Evidence:
Configure 3 missing linter(s)
Commands: npm install --save-dev eslint && npx eslint --init
npm install --save-dev markdownlint-cli && touch .markdownlint.jsonExamples:
📝 Assessment Metadata
🤖 Generated with Claude Code |
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ['3.12', '3.13'] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -e ".[dev]" | ||
|
|
||
| - name: Run black | ||
| run: | | ||
| black --check . | ||
|
|
||
| - name: Run isort | ||
| run: | | ||
| isort --check . | ||
|
|
||
| - name: Run ruff | ||
| run: | | ||
| ruff check . | ||
|
|
||
| - name: Run pytest | ||
| run: | | ||
| pytest --cov=src --cov-report=xml --cov-report=term | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v4 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 5 months ago
In general, the fix is to explicitly add a permissions: block that grants only the minimal required scopes for GITHUB_TOKEN. For this workflow, all steps only need to read the repository contents; no step pushes commits, creates releases, or modifies issues/PRs. Therefore contents: read at the workflow (top) level is sufficient and will apply to all jobs by default.
Concretely, in .github/workflows/tests.yml, add a permissions: section near the top of the file, alongside name: and on:, for example right after name: Tests. Set it to contents: read. No imports or additional methods are needed since this is a YAML workflow configuration change only. This will ensure that GITHUB_TOKEN is restricted even if repo/org defaults are broader.
| @@ -1,5 +1,8 @@ | ||
| name: Tests | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: |
Summary
agentready bootstrapagentready assessFiles added/modified
.agentready/— assessment reports and configuration.github/workflows/— CI workflows (agentready assessment, security, tests).github/ISSUE_TEMPLATE/— issue templates.github/PULL_REQUEST_TEMPLATE.md— PR template.github/CODEOWNERS— code ownership.github/dependabot.yml— dependency update config.pre-commit-config.yaml— pre-commit hooksCODE_OF_CONDUCT.md— code of conduct (if added)Test plan
🤖 Generated with Claude Code